﻿using System;
using System.ComponentModel;

namespace Jacobi.Seesmic.FeedReader.Model
{
    /// <summary>
    /// Event arguments for the async LoadCompleted event.
    /// </summary>
    internal sealed class LoadCompletedEventArgs : AsyncCompletedEventArgs
    {
        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        /// <param name="feed">The loaded feed. Can be null.</param>
        /// <param name="error">An exception. Can be null.</param>
        /// <param name="canceled">An indication if the operation was canceled.</param>
        /// <param name="userState">Not used. Always null.</param>
        public LoadCompletedEventArgs(TimelineFeed feed, Exception error, bool canceled, object userState)
            : base(error, canceled, userState)
        {
            Feed = feed;
        }

        /// <summary>
        /// Gets the feed data. Can be null.
        /// </summary>
        public TimelineFeed Feed { get; private set; }
    }
}